wayland: Ensure the touch sequence pointer value is non-null
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Sun, 8 Jun 2014 15:21:14 +0000 (17:21 +0200)
committerSjoerd Simons <sjoerd@luon.net>
Thu, 12 Jun 2014 10:35:23 +0000 (12:35 +0200)
commit5b118a9fd768f752f3e770d7734596e239de942d
tree609eef6f3ad094bea05a8851226cb2132da3c3ba
parent45a64cd7d47fcc5a54f3f83c73eb1d88b9351160
wayland: Ensure the touch sequence pointer value is non-null

Weston numbers its touch sequences ids starting from 0, thus simply
setting the GtkEvents touch.sequence to the touch id value typically
causes gdk_event_get_event_sequence to return NULL. Unfortunately this
confuses other parts of GDK.

As both weston & mutter keep the sequence id between 0..max_dev_touches
-1 simply use + 1 to keep the id > 0. While this isn't entirely correct
(compositor could send -1 as the touch id), this keeps the touch id in
gtk tied to the touch id from weston which is useful for debugging. A
more thorough solution could be done when it turns out this is an issue
in practise

https://bugzilla.gnome.org/show_bug.cgi?id=731371
gdk/wayland/gdkdevice-wayland.c